package com.spring.camel.project;

import lombok.extern.slf4j.Slf4j;
import org.apache.camel.CamelContext;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.impl.DefaultCamelContext;

/**
  * @Date 2020/4/22 0:14
  * @Author wsh
  * @Desc 文件到文件
  */
@Slf4j
public class CamelMain {
    public static void main(String[] args) throws Exception {
        CamelContext camelContext = new DefaultCamelContext();
        camelContext.addRoutes(new RouteBuilder() {
            @Override
            public void configure() throws Exception {
                from("file:C:\\Users\\nick\\Desktop\\file?noop=true")
                        .to("file:output_box");
            }
        });


        while(true)
            camelContext.start();
    }
}
